home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / ATL_Samples / sketcntr / sketcdlg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  2.0 KB  |  73 lines

  1. // SKETCDlg.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "SKETCNTR.h"
  6. #include "SKETCDlg.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSKETCNTRDlg dialog
  16.  
  17. CSKETCNTRDlg::CSKETCNTRDlg(CWnd* pParent /*=NULL*/)
  18.     : CDialog(CSKETCNTRDlg::IDD, pParent)
  19. {
  20.     //{{AFX_DATA_INIT(CSKETCNTRDlg)
  21.         // NOTE: the ClassWizard will add member initialization here
  22.     //}}AFX_DATA_INIT
  23.     // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
  24.     m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
  25. }
  26.  
  27. void CSKETCNTRDlg::DoDataExchange(CDataExchange* pDX)
  28. {
  29.     CDialog::DoDataExchange(pDX);
  30.     //{{AFX_DATA_MAP(CSKETCNTRDlg)
  31.         // NOTE: the ClassWizard will add DDX and DDV calls here
  32.     DDX_Control(pDX, IDC_SKETCH1, m_Sketch); 
  33.     //}}AFX_DATA_MAP
  34. }
  35.  
  36. BEGIN_MESSAGE_MAP(CSKETCNTRDlg, CDialog)
  37.     //{{AFX_MSG_MAP(CSKETCNTRDlg)
  38. // MM not needed in wce dialogs:    ON_WM_PAINT()
  39. // MM not needed in wce dialogs:    ON_WM_QUERYDRAGICON()
  40.     ON_BN_CLICKED(IDC_ERASE, OnErase)
  41.     //}}AFX_MSG_MAP
  42. END_MESSAGE_MAP()
  43.  
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CSKETCNTRDlg message handlers
  46.  
  47. BOOL CSKETCNTRDlg::OnInitDialog()
  48. {
  49.     CDialog::OnInitDialog();
  50.  
  51.     // Workaround needed on 7258 version of MFC in ROM.  Needed so that events
  52.     // fired from ATL are handled correctly.
  53.     // Note: m_Sketch must already be attached to a window.
  54.     ATLConnectSinks(&m_Sketch);
  55.  
  56.     // Set the icon for this dialog.  The framework does this automatically
  57.     //  when the application's main window is not a dialog
  58.     SetIcon(m_hIcon, TRUE);            // Set big icon
  59.     SetIcon(m_hIcon, FALSE);        // Set small icon
  60.     
  61.     CenterWindow(GetDesktopWindow());    // center to the hpc screen
  62.  
  63.     // TODO: Add extra initialization here
  64.     
  65.     return TRUE;  // return TRUE  unless you set the focus to a control
  66. }
  67.  
  68. void CSKETCNTRDlg::OnErase() 
  69. {
  70.     // TODO: Add your control notification handler code here
  71.     m_Sketch.Erase();
  72. }
  73.